From: Jasper St. Pierre Date: Thu, 14 Feb 2013 21:04:03 +0000 (-0500) Subject: st-texture-cache: Add one simple way to free texture load data X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~4877 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=a5d3f7785a9d000295bd37e4aeec749593fc15c0;p=gnome-shell.git st-texture-cache: Add one simple way to free texture load data https://bugzilla.gnome.org/show_bug.cgi?id=692845 --- diff --git a/src/st/st-texture-cache.c b/src/st/st-texture-cache.c index 4fd119011..3b2b8a9f8 100644 --- a/src/st/st-texture-cache.c +++ b/src/st/st-texture-cache.c @@ -299,7 +299,7 @@ typedef struct { } AsyncTextureLoadData; static void -texture_load_data_destroy (gpointer p) +texture_load_data_free (gpointer p) { AsyncTextureLoadData *data = p; @@ -317,6 +317,8 @@ texture_load_data_destroy (gpointer p) if (data->textures) g_slist_free_full (data->textures, (GDestroyNotify) g_object_unref); + + g_free (data); } /** @@ -677,8 +679,7 @@ out: if (texdata) cogl_handle_unref (texdata); - texture_load_data_destroy (data); - g_free (data); + texture_load_data_free (data); g_clear_error (&error); }